package com.huilian.iotbox.admin.wap.controller;

import com.huilian.iotbox.admin.wap.producer.RabbitProducer;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.controller.BaseController;
import com.huilian.iotbox.data.properties.ConfigProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author chenqiwen
 * @CreateDate: 2022-01-19-09-23
 * @Description:
 */
@RestController
@RequestMapping("/api/testController")
public class TestController extends BaseController {

    @Autowired
    private ConfigProperties configProperties;
    @Autowired
    private RabbitProducer rabbitProducer;

    @GetMapping("/test")
    public ServerResponse test() {

        Map<String, String> delayMap = new HashMap<>();
        delayMap.put("activityId", "8");
        rabbitProducer.sendReplayActivityStartStateLazyQueue(delayMap, 5000);

        return ServerResponse.createBySuccess();
    }

}
